The present invention relates generally to computer systems, and more particularly to data structures used in a memory of a computer system.
Computer systems have continually evolving technology leading to increased performance and complexity in the systems. For example, systems with multiple processors and/or processors with multiple cores will lead to simultaneous execution of a plurality of threads. Data structures, such as a queues, stacks and double ended queues (“deques”), may be used to implement an application.
In some cases, such as a networked computer system delivering packets out of order, counters may be used in each destination node. The counter value is initialized to the number of packets, where the counter value may indicate all of the packets are received when it reaches a selected value. The application periodically polls the counter to determine the value and thus is notified that all of the packets are received when it reads the selected value when polling the counter.